Peck Yong Lee

Adventure through Samba & Active Directory

AI tools were not used in the production of this post.

Background

I inherited a (mostly) greenfield IT environment when I joined a growing SME firm as an IT consultant. This firm had recently moved all their data to a Synology network-attached storage (NAS) device, and decided to forgo backing up individual workstations in favor of backing up the NAS instead. So, the firms storage and backup strategy were sorted, however there were still many issues. Most pressing of which was network security, which I'll cover in another post.

Problem

The second most pressing matter was endpoint security and management. Here were some of the biggest pain points:

Needless to say, it was a tedious and fragile process.

Solution

I decided that it was worth the effort to set up an Active Directory domain, especially considering that the firm was growing. This would allow for centralised authentication and Windows host management.

The first rather obvious solution I considered was Windows Server. However, funding for Windows Server licenses could not be obtained, so I decided to try using Samba on Debian Linux as the Active Directory domain controller instead. I heard good things about Samba from a few other IT professionals, and was comfortable with using Linux and troubleshooting issues myself, so it was a natural choice.

I spun up a Debian VM on the firms Proxmox VE environment, installed Samba via apt and then followed the instructions provided in the Samba documentation. It was surprisingly easier than I expected, and before I knew it, the domain controller was up and running. After joining all Windows hosts as well as the NAS to the domain, I immediately got to work creating all user accounts and Group Policies through Remote Server Administration Tools

Benefits

Here were the benefits of implementing Active Directory:

Provisioning a new user was now a one step process: create the new user in Active Directory Users and Computers and assign them to the appropriate groups. After that, It Just WorksTM as described above.

What I would improve in future

I would setup a secondary domain controller on a seperate physical host for redundancy. Unfortunately, this was not possible due to resource constraints, and the firm's leadership was advised of the possibility of extended downtime if the single domain controller failed. However, this risk was deemed acceptable, as recovery was expected to be relatively quick.